<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>3D爱心</title>
	<style>
		*{margin: 0;padding: 0;}
		body{
			background-color: #000;
			overflow: hidden;
		}
		.heart{
			position: relative;
			width: 100px;
			height: 160px;
			margin: 100px auto;
			transform-style: preserve-3d;
			 /*perspective: 500px; */
			animation: rot 15s linear infinite; /*动画名称  时间 均速  无限重复*/
		}
		.rib{
			position:absolute;
			width: 100px;
			height: 160px;
			border: 1px solid red;
			border-width: 1px 1px 0 0;	
			border-radius: 50% 50% 0/40% 50% 0;  /* 第一值左上  第二个右上和左下  第三个右下 */
		}
		.rib:nth-child(1){
			transform: rotateY(0deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(2){
			transform: rotateY(30deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(3){
			transform: rotateY(60deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(4){
			transform: rotateY(90deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(5){
			transform: rotateY(120deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(6){
			transform: rotateY(150deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(7){
			transform: rotateY(180deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(8){
			transform: rotateY(210deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(9){
			transform: rotateY(240deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(10){
			transform: rotateY(270deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(11){
			transform: rotateY(300deg) rotateZ(45deg) translateX(30px);
		}
		.rib:nth-child(12){
			transform: rotateY(330deg) rotateZ(45deg) translateX(30px);
		}
		@keyframes rot{ /* 动画帧 */
			from{transform: rotateY(0deg) rotateX(0deg)}
			to{transform: rotateY(360deg) rotateX(360deg)}
		}
		.txt{
			position: absolute;
			transform: translateY(80px);
			margin-left: 30px;
			font-size: 30px;
			color: #fff;
			text-shadow: 0px -1px 4px white, 0px -2px 10px yellow, 0px -10px 20px #ff8000, 0px -18px 40px red;
		}
		.two{
			transform-origin: right center;
			transform: translateY(80px) rotateY(90deg);
		}
		.three{
			transform-origin: left center;
			transform: translateY(80px) rotateY(-90deg);
		}
		.si{
			transform-origin: top center;
			transform: translateY(80px) rotateX(90deg);
		}
		.wu{
			transform-origin: bottom center;
			transform: translateY(80px) rotateX(-90deg);
		}
		.liu{
			transform-origin: center center;
			transform: translateY(80px) translateZ(30px);
		}
		
	</style>
</head>
<body>
	<div class="heart">
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="rib"></div>
		<div class="txt two">爱</div>
		<div class="txt three">爱</div>
		<div class="txt si">爱</div>
		<div class="txt wu">爱</div>
		<div class="txt liu">爱</div>
		<div class="txt">爱</div>
	</div>
</body>
</html>